#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
ll h, m;

int main()
{
	cin.tie(0);
	ll x1, y1, x2, y2;
	cin >> x1 >> x1;
	double s = 0;
	while (cin >> x1 >> y1 >> x2 >> y2) {
		s += sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
	}
	double t = 2 * s / 1000 / 20;
	h = (ll)t;
	m = (ll)((t - h) * 60 + 0.5);
	printf("%lld:%02lld", h, m);
	return 0;
}